package cn.ezios.huo.system.biz.role;

import cn.ezios.huo.common.mvc.Ret;
import cn.ezios.huo.system.dao.service.SysRoleService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
@RequestMapping("/v1/sys/role")
public class RoleController {

    private final RoleService roleService;
    private final SysRoleService sysRoleService;

    @PostMapping("/{id}")
    public Ret getRoleById(@PathVariable("id") String id) {
        return Ret.ok(sysRoleService.getById(id));
    }

}
